<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>最小化demo</title>
    <script type="text/javascript" src="../dist/dnd.js"></script>
    <style>
      html, body { width:100%; height:100%; }
      body { margin:0; padding:20px; box-sizing:border-box; }
      .drop { margin:20px auto; width:100%; height:100px; border:1px solid #000; }
      .drag-box {
        position: absolute;
        width: 800px;
      }
      .drag-box .drag {
        display: block;
        width: 400px;
        text-align: center;
        background: #ccc;
      }
    </style>
  </head>

  <body>
    <div class="drop"></div>
    <div class="drag-box">
      <span class="drag">拖动我到上方框框</span>
    </div>
  </body>

  <script>
    var Drag = dnd.Drag
    var Drop = dnd.Drop
    new Drag('.drag')
    new Drop('.drop', {
      onDrop: function (params) {
        console.log(params)
        params.el.appendChild(params.sourceNode)
      }
    })
  </script>
</html>
